package com.guigu.tms.aggregation.controller;

import com.github.pagehelper.PageInfo;
import com.guigu.tms.aggregation.service.IDriverJobService;
import com.guigu.tms.commons.aggregation.entity.DriverJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import com.guigu.tms.aggregation.service.IDriverJobService;
import com.guigu.tms.commons.aggregation.entity.DriverJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 司机作业单 前端控制器
 * </p>
 *
 * @author wj
 * @since 2022-10-21
 */
@RestController
@RequestMapping("/driverJob")
public class DriverJobController {
    @Autowired
   private IDriverJobService service;
    /*司机作业单查询*/
    @GetMapping("DriverJobAll")
    public PageInfo<DriverJob> DriverJobAll(String id, String name, Integer status, String taskTransportId, Integer num, Integer size) {
    return service.DriverJobAll(id, name, status, taskTransportId, num, size);
        }

    @PostMapping("createDriverJob")
    public boolean createDriverJob(@RequestBody DriverJob driverJob){
        return service.save(driverJob);
    }
    }
